package com.platform.user.center.portal.service.impl;

import com.github.pagehelper.PageHelper;
import com.platform.user.center.portal.dao.VirtualTransitCardMapper;
import com.platform.user.center.portal.entity.VirtualTransitCard;
import com.platform.user.center.portal.service.VirtualTransitCardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created by churcy on 2017/3/2.
 */
@Service("virtualTransitCardServiceImpl")
public class VirtualTransitCardServiceImpl extends BaseServiceImpl<VirtualTransitCard, Integer> implements VirtualTransitCardService {



    @Autowired
    private VirtualTransitCardMapper virtualTransitCardMapper;

    @Override
    public List<Map<String, String>> findByConditions(Map<String, Object> conditions) {
        PageHelper.startPage(Integer.valueOf((String) conditions.get("pageNum")), Integer.valueOf((String) conditions.get("pageSize")));
        return virtualTransitCardMapper.findByConditions(conditions);
    }

    @Override
    public VirtualTransitCard getByUserId(String userId) {
        return virtualTransitCardMapper.getByUserId(userId);
    }

    @Override
    public List<Map<String, String>> findDisabled() {
        return virtualTransitCardMapper.findDisabled();
    }
}
